//
//  ItemNode.h
//  ItemViewTest
//
//  Created by bean on 13/5/7.
//  Copyright 2013年 __MyCompanyName__. All rights reserved.
//

#ifndef ItemViewTest_ItemNode_h
#define ItemViewTest_ItemNode_h

#include "cocos2d.h"
#include "DelegateManager.h"
class ItemNode : public cocos2d::CCNode
{
public:
    ItemNode(void);
    virtual ~ItemNode(void);
    virtual bool init(void);
    CREATE_FUNC(ItemNode);
    void setDelegate(ItemNodeDelegate *delegate);
    cocos2d::CCSprite* touchStartWithPoint(cocos2d::CCPoint p);
    void touchEndWithPoint(cocos2d::CCPoint p, cocos2d::CCSprite* s);
    void setScrollSize(cocos2d::CCSize size);
    
    void setItems(cocos2d::CCArray* array);
private:
    ItemNodeDelegate* m_delegate;
    cocos2d::CCArray* m_spiteArray;
    cocos2d::CCSize m_frameSize;
    cocos2d::CCSize m_itemSize;
};

#endif
